#!/bin/bash
cd "$(dirname "$0")"

# 显示当前工作目录和文件列表
echo "Current directory: $(pwd)"
ls -la

# 首先尝试使用gunicorn启动
if command -v gunicorn &> /dev/null; then
    echo "Starting Flask application with Gunicorn"
    gunicorn app:app --bind 0.0.0.0:8000
else
    # 如果没有gunicorn，直接使用python启动
    echo "Gunicorn not found, starting Flask application directly"
    python app.py
fi 